#include <stdio.h>

int main()
{
	int number;
	scanf("%d",&number);
	
	int a = number / 100;
	int b = number % 100 / 10;
	int c = number % 10;
	printf("%d%d%d",c,b,a);
}
